package com.sesxh.project.knowledge;

import java.util.stream.Stream;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.Import;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;

import com.sesxh.frame.boot.starter.configrations.datasourse.DynamicDataSourceRegister;
import com.sesxh.frame.boot.starter.configrations.swagger.EnableSesxhSwagger2;

@EnableAspectJAutoProxy(proxyTargetClass = true)
@ServletComponentScan
@EnableConfigurationProperties
@Import({DynamicDataSourceRegister.class})
@EnableSesxhSwagger2
@EnableAsync
@EnableScheduling  
@SpringBootApplication( scanBasePackages= {  "com.sesxh.project.knowledge","com.sesxh.frame"}) 
public class AppMainEntry{   
	
    public static void main(String[] args) throws Exception {
        // 设置环境变量，解决Es的netty与Netty服务本身不兼容问题
        System.setProperty("es.set.netty.runtime.available.processors","false");
    	ConfigurableApplicationContext aap=SpringApplication.run(AppMainEntry.class, args);
    	Stream.of(aap.getBeanDefinitionNames()).forEach(val->{
    		//System.out.println(val); 
    	});
    }
    
    
   
}
